<script>
import GoodsList from "@/components/GoodsList.vue";

export default {
    name: "App",
    components: {GoodsList},
    data(){
        return {
            phoneList:[
                {
                    id:1,
                    goodsName:"手机iphone11"
                },{
                    id:2,
                    goodsName: "手机iphone17"
                }
            ],
            bookList:[
                {
                    id:11,
                    goodsName:"斗破苍穹"
                },{
                    id:12,
                    goodsName: "斗罗大陆"
                }
            ]
        }
    }
}
</script>

<template>
    <div>
        <GoodsList>
            <template v-slot:one>
                <h3 style="color:red;">手机1</h3>
            </template>
            <!--   v-slot: 可以简写成#         -->
            <template #two>
                <h3 style="color:green;">手机2</h3>
            </template>
            <template #default>
                <h3 style="color:pink;">手机3</h3>
            </template>
        </GoodsList>
    </div>

</template>

<style scoped>

</style>